import requests



headers = {
    'User-Agent':
        'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36'

}


# 第一步，先访问首页，获取到cookie
session = requests.session()
main_url= 'https://xueqiu.com'
resp = session.get(url=main_url,headers=headers)

# 第二步，访问异步加载的地址，携带着cookie过去
url='https://xueqiu.com/statuses/hot/listV2.json?since_id=-1&max_id=-1&size=15'
resp= session.get(url,headers=headers)
print(resp)
print(resp.json())
